<?php

/*
 * This file is part of the FOSUserBundle package.
 *
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Gds\UserBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;

class EditInfoForm extends AbstractType {


    public function buildForm(FormBuilderInterface $builder, array $options) {
        $builder
                ->add('username', null, array('label' => 'Login'))
                ->add('email', 'email', array('label' => 'Email'))
                ->add('nom', 'text', array('label' => 'Prénom'))
                ->add('prenom', 'text', array('label' => 'Nom'))
                ->add('photo', 'text')
                ->add('telephone')
                ->add('cin', 'text', array('label' => 'Carte identité'))
                ->add('function', 'text', array('label' => 'Fonction'))
                ->add('departement', null, array('label' => 'Département'))
            ;
    }


    public function setDefaultOptions(OptionsResolverInterface $resolver) {
       $resolver->setDefaults(array(
            'data_class' => 'Gds\UserBundle\Entity\User'
        ));
    }

    public function getName() {
        return 'gds_user_edit';
    }

}
